package com.bd.scm.module.department.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bd.scm.dao.mapper.department.DtDepCustMapper;
import com.bd.scm.domain.models.department.DtDepCust;
import com.bd.scm.module.common.BaseServiceImpl;
import com.bd.scm.module.department.service.IDtDepCustService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  部门负责人服务实现类
 * </p>
 *
 * @author yufc
 * @since 2019-12-28
 */
@Service
public class DtDepCustServiceImpl extends BaseServiceImpl<DtDepCustMapper, DtDepCust> implements IDtDepCustService {

    /**
     * 根据用户身份证查询数据
     *
     * @param userId
     * @return
     */
    @Override
    public DtDepCust getByUserId(Long userId) {
        return baseMapper.selectOne(new QueryWrapper<DtDepCust>().eq("user_serial", userId));
    }
}
